import { CardEditableParamsDefault, CardDataEditableParamsCommonDefault } from "@/views/card/js/data/cardDatas/card-datas-default.js";
import TooltipsData from "@/views/card/js/data/tooltipsData/tooltips-data.js";
const CARD_27 =  {
    title_sub: {
      ...CardEditableParamsDefault.InputNormal,
      label: '标题',
      placeholder: '请填入标题',
    },
    desc: {
      ...CardEditableParamsDefault.InputNormal,
      label: '描述',
      placeholder: '请填入描述',
    },
    pic: {
      ...CardEditableParamsDefault.ImageNormal,
      label: '图片',
      res_type: 'String',  // Array : fileList, String : value
      placeholder: '尺寸严格按照设置的宽高，小于500kb，jpg,jpeg,png,gif格式',
      limit: 1,
      size: 500,
      accept: '.jpg, .jpeg, .png, .gif',
      tooltips: TooltipsData.image[3],
    },
    scheme: {
      ...CardEditableParamsDefault.InputNormal,
      label: '跳转链接',
      placeholder: '请填入跳转链接',
    },
    buttons: {
      ...CardEditableParamsDefault.Lists,
      label: '添加按钮',
      limit: 3,
      param_params: {
        name: {
          ...CardEditableParamsDefault.InputNormal,
          label: '按钮名称',
          placeholder: '请选择按钮名称',
        },
        pic: {
          ...CardEditableParamsDefault.ImageNormal,
          label: '按钮Icon',
          res_type: 'String',  // Array : fileList, String : value
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 1,
          size: 100,
          accept: '.png',
          // suffix: '_default',
          tooltips: TooltipsData.image[5],
        },
        pic_default: {
          ...CardEditableParamsDefault.ImageNormal,
          label: '按钮Icon(同上)',
          res_type: 'String',  // Array : fileList, String : value
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 1,
          size: 100,
          accept: '.png',
          suffix: '_default',
          tooltips: TooltipsData.image[6],
        },
        type: {
          ...CardEditableParamsDefault.DropdownNormal,
          label: '按钮类型',
          placeholder: '请选择按钮类型',
          valLists: [
            {
              name: '默认',
              value: 'default',
            },
            {
              name: '链接',  // 默认类型
              value: 'link',
            },
          ],
        },
        params: {
          ...CardEditableParamsDefault.Obj,
          label: '按钮配置',
          param_params: {
            scheme: {
              // ...CardEditableParamsDefault.InputNormal,
              // label: '跳转链接',
              // placeholder: '请选择跳转链接',

              ...CardEditableParamsDefault.MixedInput,
              label: '跳转链接',
              placeholder: '请填入跳转链接',
              original_type: 'InputNormal',
              original_type_list: [
                {
                  value: 'InputNormal',
                  label: '链接',
                },
                {
                  value: 'DropdownNormal',
                  label: '弹层',
                },
              ],
              original_type_prop_list: {
                'DropdownNormal': {
                  data_type: 'PANEL'
                },
                'InputNormal': {},
              },
              original_type_config_list: {
                'DropdownNormal': {
                  prefix: 'http://iapib.hd.xxx.com/v1/fcardlist/getPanel?pageNum=',
                  // suffix: '',
                  encode: true,
                  parent: {
                    prefix: 'sinaweibo://pagealert?request_url=',
                    // suffix: '',
                    // encode: false,
                  },
                },
                'InputNormal': {},
              },
            },
            action: {
              ...CardEditableParamsDefault.Action,
              label: '按钮事件',
              placeholder: '请选择按钮事件',
              tooltips: TooltipsData.others[1],
            },
          },

          param_effect_parent: {
            effect_parent_keys: ['buttons', 'ARRAY_NUM', 'type'],
            effect_type: ['CHANGE_PARAMS'],
            effect_parent_val: '',
            effect_clear: {
              effect_clear_default_val: {},
            },
            effect_obj_params: [  // 受 CHANGE_PARAMS 影响
              {
                effect_regular: new RegExp("^link$"),
                effect_new_obj_params: {
                  scheme: '',
                },
              },
              {
                effect_regular: new RegExp("^default$"),
                effect_new_obj_params: {
                  action: '',
                },
              },
            ],
          },
        },
      },
    },
    ...CardDataEditableParamsCommonDefault,
  };
export default CARD_27;
